package HomeElements;

import android.support.test.uiautomator.UiDevice;

import static util.GetDevice.getDevice;
import static HomeElements.Action.*;

/**
 * Created by zhe.xiao on 2017/6/27.
 */

public class ZuiJinGuanZhuData {
    private static UiDevice device = getDevice();
    /**
     * 酒店在最近关注中出现
     */
    public static void zuiJinGuanZhuHotel(){
        clickHomeHotel();
        clickHotelName();
        sendHotelName();
        clickHotelName1();
        clickHotelSearch();
        sleep();
        clickHotel1Dan();
        sleep();
        back();
        clickHotel2Dan();
        sleep();
        back();
        clickHotel3Dan();
        sleep();
        back();
        clickHotel4Dan();
        sleep();
        back();
        sleep();
        back();
        sleep();
        back();
    }

    /**
     * 门票在最近关注中出现
     */
    public static void zuiJinGuanZhuTicket(){
        clickDaShou();
        daSouSendText();
        clickTickSearch();
        sleep();
        clickTicketDan1();
        sleep();
        back();
        clickTicketDan2();
        sleep();
        back();
        clickTicketDan3();
        sleep();
        back();
        clickTicketDan4();
        back();
        sleep();
        back();
        sleep();
        back();
        sleep();
        back();
    }

    private static void sleep(){
        try {
            Thread.sleep(5000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
